win32: Fix GTK warnings
authorBenjamin Otte <otte@redhat.com>
Fri, 24 Sep 2021 21:18:15 +0000 (23:18 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 24 Sep 2021 21:26:45 +0000 (23:26 +0200)
gtk/gtkimcontextime.c
gtk/inspector/general.c

index 8f09cde29d4fd9595b1c62039e989bc6e6e26fa9..c5ca85997c3a697d7fd8ce9fb93a97d36236b2eb 100644 (file)
@@ -684,6 +684,9 @@ gtk_im_context_ime_focus_in (GtkIMContext *context)
           g_free (utf8str);
         }
         break;
+      default:
+        g_assert_not_reached ();
+        break;
     }
 
   /* clean */
@@ -695,8 +698,6 @@ static void
 gtk_im_context_ime_focus_out (GtkIMContext *context)
 {
   GtkIMContextIME *context_ime = GTK_IM_CONTEXT_IME (context);
-  HWND hwnd;
-  HIMC himc;
   gboolean was_preediting;
 
   if (!GDK_IS_SURFACE (context_ime->client_surface))
@@ -975,16 +976,16 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
         get_window_position (context_ime->client_surface, &wx, &wy);
         /* FIXME! */
         {
-          HWND hwnd;
+          HWND impl_hwnd;
           POINT pt;
           RECT rc;
 
-          hwnd =
+          impl_hwnd =
             gdk_win32_surface_get_impl_hwnd (context_ime->client_surface);
-          GetWindowRect (hwnd, &rc);
+          GetWindowRect (impl_hwnd, &rc);
           pt.x = wx;
           pt.y = wy;
-          ClientToScreen (hwnd, &pt);
+          ClientToScreen (impl_hwnd, &pt);
           wx = pt.x - rc.left;
           wy = pt.y - rc.top;
         }
index ea8e617fa71da55a4986c1e98eb9c3ce133faf4f..852ecc90ee8c88a0704b202a64fef5e0daa42ae0 100644 (file)
@@ -372,10 +372,10 @@ init_gl (GtkInspectorGeneral *gen)
       char *version;
 
       gl_version = epoxy_gl_version ();
-      version = g_strdup_printf ("WGL %d.%d", gl_version / 10, gl_version % 10, NULL);
+      version = g_strdup_printf ("WGL %d.%d", gl_version / 10, gl_version % 10);
       gtk_label_set_text (GTK_LABEL (gen->gl_version), version);
       g_free (version);
-      gtk_label_set_text (GTK_LABEL (gen->gl_vendor), glGetString (GL_VENDOR));
+      gtk_label_set_text (GTK_LABEL (gen->gl_vendor), (const char *) glGetString (GL_VENDOR));
 
       append_wgl_extension_row (gen, "WGL_EXT_create_context");
       append_wgl_extension_row (gen, "WGL_EXT_swap_control");